// router
import Vue from 'vue'
import VueRouter from 'vue-router'
import VueResource from 'vue-resource'
import home from '../components/home.vue'
import index from '../index.vue'
import store from '../store/index.js'
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import test from  'components/test.vue'
import adddatasourceinfo from 'components/adddatasourceinfo.vue'
import hbaselistdatasourceinfo from 'components/hbaselistdatasourceinfo.vue'
import hivelistdatasourceinfo from 'components/hivelistdatasourceinfo.vue'
import clickhouselistdatasourceinfo from 'components/clickhouselistdatasourceinfo.vue'
import mysqllistdatasourceinfo from 'components/mysqllistdatasourceinfo.vue'
import inputdatasourceinfo from 'components/inputdatasourceinfo.vue'
import dataaccesslistinfo from 'components/dataaccesslistinfo.vue'
import dataruleinfo from 'components/dataruleinfo.vue'
import rulelistinfo from 'components/rulelistinfo.vue'
import resportnulllistinfo from 'components/resportnulllistinfo.vue'
import resportuniquelistinfo from 'components/resportuniquelistinfo.vue'
import resportdatevalidlistinfo from 'components/resportdatevalidlistinfo.vue'
import resportvcontainlistinfo from 'components/resportvcontainlistinfo.vue'
import adddataresourceinfo from 'components/adddataresourceinfo.vue'
import dataresoucelistinfo from 'components/dataresoucelistinfo.vue'
import myresoureapplylistinfo from 'components/myresoureapplylistinfo.vue'
import approveresoureapplylistinfo from 'components/approveresoureapplylistinfo.vue'
import approveresourevueinfo from 'components/approveresourevueinfo.vue'
import hue from 'components/hue.vue'
import atlas from 'components/atlas.vue'

  Vue.use(Element)
Vue.use(VueResource)

Vue.use(VueRouter)


/* eslint-disable no-new */
// new Vue({
//   el: '#app',
//   render: h => h(App)
// })


// 0. 如果使用模块化机制编程， 要调用 Vue.use(VueRouter)

// 1. 定义（路由）组件。
// 可以从其他文件 import 进来
// 2. 定义路由
// 每个路由应该映射一个组件。 其中"component" 可以是
// 通过 Vue.extend() 创建的组件构造器，
// 或者，只是一个组件配置对象。

const routes = [
  { path: '/',name:"home",component: home},
  { path: '/test',name:"test",component: test},
  { path: '/adddatasourceinfo',name:"adddatasourceinfo",component: adddatasourceinfo},
  { path: '/hbaselistdatasourceinfo',name:"hbaselistdatasourceinfo",component: hbaselistdatasourceinfo},
  { path: '/hivelistdatasourceinfo',name:"hivelistdatasourceinfo",component: hivelistdatasourceinfo},
  { path: '/clickhouselistdatasourceinfo',name:"clickhouselistdatasourceinfo",component: clickhouselistdatasourceinfo},
  { path: '/mysqllistdatasourceinfo',name:"mysqllistdatasourceinfo",component: mysqllistdatasourceinfo},
  { path: '/inputdatasourceinfo',name:"inputdatasourceinfo",component: inputdatasourceinfo},
  { path: '/dataaccesslistinfo',name:"dataaccesslistinfo",component: dataaccesslistinfo},
  { path: '/dataruleinfo',name:"dataruleinfo",component: dataruleinfo},
  { path: '/rulelistinfo',name:"rulelistinfo",component: rulelistinfo},
  { path: '/resportnulllistinfo',name:"resportnulllistinfo",component: resportnulllistinfo},
  { path: '/resportuniquelistinfo',name:"resportuniquelistinfo",component: resportuniquelistinfo},
  { path: '/resportdatevalidlistinfo',name:"resportdatevalidlistinfo",component: resportdatevalidlistinfo},
  { path: '/resportvcontainlistinfo',name:"resportvcontainlistinfo",component: resportvcontainlistinfo},
  { path: '/adddataresourceinfo',name:"adddataresourceinfo",component: adddataresourceinfo},
  { path: '/dataresoucelistinfo',name:"dataresoucelistinfo",component: dataresoucelistinfo},
  { path: '/myresoureapplylistinfo',name:"myresoureapplylistinfo",component: myresoureapplylistinfo},
  { path: '/approveresoureapplylistinfo',name:"approveresoureapplylistinfo",component: approveresoureapplylistinfo},
  { path: '/approveresourevueinfo',name:"approveresourevueinfo",component: approveresourevueinfo},
  { path: '/hue',name:"hue",component: hue},
  { path: '/atlas',name:"atlas",component: atlas},



]

// 3. 创建 router 实例，然后传 `routes` 配置
// 你还可以传别的配置参数, 不过先这么简单着吧。
const router = new VueRouter({
  mode: 'history',
  routes // （缩写）相当于 routes: routes
})

// 4. 创建和挂载根实例。
// 记得要通过 router 配置参数注入路由，
// 从而让整个应用都有路由功能
const app = new Vue({
  store,
  router,
  render: h => h(index)
}).$mount('#app')
// 现在，应用已经启动了！
